//
//  SavePhotoImageViewController.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/19.
//

#import "SavePhotoImageViewController.h"

@interface SavePhotoImageViewController ()

@end

@implementation SavePhotoImageViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = rgba(245, 245, 255, 1);
    self.navigationController.navigationBar.hidden = YES;
    NavigationHeadView *navgationheadv = [[NavigationHeadView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, SafeAreaTopHight)];
    navgationheadv.backgroundColor = [UIColor whiteColor];
    navgationheadv.titlelabel.text = @"保存图片";
    navgationheadv.titlelabel.textColor  = [UIColor blackColor];
    [navgationheadv.backbtn addTarget:self action:@selector(returnback) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:navgationheadv];
    
    
    UIImageView *circleimgv = [[UIImageView alloc]initWithFrame:CGRectMake(0, SafeAreaTopHight, APPwidth, APPheight-300)];
    circleimgv.backgroundColor = [UIColor whiteColor];
    circleimgv.image = _img;
    circleimgv.clipsToBounds = YES;
    circleimgv.contentMode = UIViewContentModeScaleAspectFit;
    circleimgv.userInteractionEnabled = YES;
    [self.view addSubview:circleimgv];
    
    
    UIView *backV = [[UIView alloc]initWithFrame:CGRectMake(0, circleimgv.height+circleimgv.y, APPwidth, 80)];
    backV.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:backV];

    
    
    UIImageView *headimg = [[UIImageView alloc]initWithFrame:CGRectMake(40, circleimgv.height+circleimgv.y+10, 40, 40)];
    headimg.backgroundColor = [UIColor grayColor];
    headimg.image = [UIImage imageNamed:@"headicon"];
    headimg.layer.cornerRadius = 40/2;
    headimg.userInteractionEnabled = YES;
    [self.view addSubview:headimg];

    UILabel *nameLab = [[UILabel alloc]initWithFrame:CGRectMake(headimg.frame.size.width+headimg.frame.origin.x+5,  10, 55, 20)];
    nameLab.text = @"肯德基";
    nameLab.textColor = [UIColor blackColor];
    nameLab.textAlignment = 0;
    nameLab.font = [UIFont systemFontOfSize:14];
    [backV addSubview:nameLab];
    
    
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(nameLab.width+nameLab.x+5, 15, 1, 10)];
    line.backgroundColor = [UIColor grayColor];
    [backV addSubview:line];


    UILabel *phonenumlab = [[UILabel alloc]initWithFrame:CGRectMake(line.width+line.x,  15, 100, 10)];
    phonenumlab.text = @"18520342342";
    phonenumlab.textColor = [UIColor grayColor];
    phonenumlab.textAlignment = 1;
    phonenumlab.font = [UIFont systemFontOfSize:10];
    [backV addSubview:phonenumlab];
    

    UILabel *classNameLab = [[UILabel alloc]initWithFrame:CGRectMake(headimg.frame.size.width+headimg.frame.origin.x+10,  nameLab.frame.size.height + nameLab.frame.origin.y+5, APPwidth/2, 15)];
    classNameLab.text = @"阿牛驾校";
    classNameLab.textColor = [UIColor grayColor];
    classNameLab.textAlignment = 0;
    classNameLab.font = [UIFont systemFontOfSize:10];
    [backV addSubview:classNameLab];
    
    UILabel *disLab = [[UILabel alloc]initWithFrame:CGRectMake(40,classNameLab.frame.size.height + classNameLab.frame.origin.y+15, APPwidth-80, 10)];
    disLab.text = @"🔥学车找我      🔥 微信扫码查看招生信息      🔥一直在岗";
    disLab.textColor = rgba(138, 138, 138, 1);
    disLab.textAlignment = 1;
    disLab.font = [UIFont systemFontOfSize:10];
    [backV addSubview:disLab];

    UIButton *dequreBtn = [[UIButton alloc]initWithFrame:CGRectMake(0,APPheight-40, APPwidth/2, 40)];
    [dequreBtn setTitle:@"取消" forState:0];
    [dequreBtn setTitleColor:[UIColor blackColor] forState:0];
    dequreBtn.titleLabel.textAlignment = 1;
    [dequreBtn setBackgroundColor:[UIColor whiteColor]];
    [dequreBtn addTarget:self action:@selector(returnback) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:dequreBtn];
    
    UIButton *sureBtn = [[UIButton alloc]initWithFrame:CGRectMake(APPwidth/2,APPheight-40, APPwidth/2, 40)];
    [sureBtn setTitle:@"确定" forState:0];
    [sureBtn setTitleColor:[UIColor whiteColor] forState:0];
    sureBtn.titleLabel.textAlignment = 1;
    [sureBtn setBackgroundColor:[UIColor blueColor]];
    [self.view addSubview:sureBtn];
    
    
}
-(void)returnback{
    
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark -视图即将出现
-(void)viewWillAppear:(BOOL)animated{
        
    ((TabbarController *)self.tabBarController).tabBarView.hidden = YES;
    
}
@end
